<?php
$mysqli = new Mysqli("localhost", "root", "root", "db_yuedu");
if ($mysqli->connect_errno) {
    die();
}
$id = $_GET["id"];
$cb = $_GET["cb"];
$id = ($id - 1) * 10;
$type_id = $_GET["type_id"];
$sql = "select * from t_articles where type_id = {$type_id} limit {$id} ,10";
$result = $mysqli->query($sql);
while ($row = $result->fetch_assoc()) {
    $arr[] = $row;
}
$json = json_encode($arr);
echo"{$cb}({$json})";